from logger import logger
from sub_events.base_event import BaseEvent

LOGGER = logger.CustomLogger()

class BuildFailEvent(BaseEvent):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.event_name_zh: str = "侵入式修改检查强制通过"
        self.event_name_en: str = "Force Intrusive Modification Check"

    def pre_execute(self) -> bool:
        return self.hook.commenter == "https://gitee.com/openharmony_ci"

    def execute(self) :
        self.comment = """#  ⚠️ &zwnj;**门禁构建失败，请谨慎触发！**&zwnj;  ⚠️
#  ⚠️ &zwnj;**Gate build failed - trigger cautiously!**&zwnj;  ⚠️
#  ⚠️ &zwnj;**门禁构建失败，请谨慎触发！**&zwnj;  ⚠️
#  ⚠️ &zwnj;**Gate build failed - trigger cautiously!**&zwnj;  ⚠️"""
